/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author lzw
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';

const { adminPath } = useGlobSetting();

export interface ListItem {
  id: string;
  avatar: string;
  // 通知的标题内容
  title: string;
  // 是否在标题上显示删除线
  titleDelete?: boolean;
  datetime?: string;
  type: string;
  read?: boolean;
  description: string;
  clickClose?: boolean;
  extra?: string;
  color?: string;
}

export interface TabItem {
  key?: string;
  name?: string;
  list?: ListItem[];
}

export const tabListData = await getShelfList();

export async function getShelfList() {
  return defHttp
    .post({
      url: adminPath + '/operating/fstWorkInfo/listData',
    })
    .then((res) => {
      return res;
    });
}
